package com.engine.salary.service;

import com.engine.salary.entity.datacollection.dto.SpecialAddDeductionListDTO;
import com.engine.salary.entity.datacollection.dto.SpecialAddDeductionRecordDTO;
import com.engine.salary.entity.datacollection.param.SpecialAddDeductionImportParam;
import com.engine.salary.entity.datacollection.param.SpecialAddDeductionParam;
import com.engine.salary.entity.datacollection.param.SpecialAddDeductionQueryParam;
import com.engine.salary.entity.datacollection.param.SpecialAddDeductionRecordDeleteParam;
import com.engine.salary.entity.datacollection.po.SpecialAddDeductionPO;
import com.engine.salary.util.excel.ExcelPreviewDTO;
import com.engine.salary.util.page.PageInfo;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.time.YearMonth;
import java.util.List;
import java.util.Map;

/**
 * 数据采集-其他免税扣除
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author lfc
 * @version 1.0
 **/
public interface SpecialAddDeductionService {

    /**
     * 通过id获取单条专项扣除记录
     *
     * @param id
     * @return
     */
    SpecialAddDeductionPO getById(Long id);

    /**
     * 数据采集-其他免税扣除列表
     *
     * @param queryParam
     * @return
     */
    PageInfo<SpecialAddDeductionListDTO> listPage(SpecialAddDeductionQueryParam queryParam);

    /**
     * 获取数据采集-其他免税扣除详情
     *
     * @param queryParam
     * @return
     */
    PageInfo<SpecialAddDeductionRecordDTO> recordListPage(SpecialAddDeductionQueryParam queryParam);

    /**
     * 导出
     *
     */
    XSSFWorkbook export(SpecialAddDeductionQueryParam queryParam, boolean isTemplate);

    /**
     * 导出详情
     *
     */
    XSSFWorkbook exportDetail(SpecialAddDeductionQueryParam queryParam);

    /**
     * 预览
     */
    ExcelPreviewDTO preview(SpecialAddDeductionImportParam importParam);

    /**
     * 导入数据
     */
    Map<String, Object> importData(SpecialAddDeductionImportParam importParam);



    /**
     * 获取其他免税扣除数据
     *
     * @param declareMonth
     * @param employeeIds
     * @return
     */
    List<SpecialAddDeductionPO> getSpecialAddDeductionList(YearMonth declareMonth, List<Long> employeeIds, Long taxAgentId);

    /**
     * 编辑数据
     */
    void editData(SpecialAddDeductionParam SpecialAddDeductionParam);

    /**
     * 新增数据
     */
    void createData(SpecialAddDeductionParam SpecialAddDeductionParam);

    /**
     * 删除所选数据
     */
    void deleteSelectData(SpecialAddDeductionRecordDeleteParam deleteParam);

    /**
     * 一键清空数据
     */
    void deleteAllData(SpecialAddDeductionRecordDeleteParam deleteParam);

    List<SpecialAddDeductionPO> getSpecialAddDeductionPOByEmployee(List<Long> employeeId, Long taxAgentId);

    SpecialAddDeductionRecordDTO getRecordById(Long id);
}
